#include "ch32x035.h"
#include "stdint.h"
#include "stdio.h"
#include "cpuusage.h"

#include "DevicesADC.h"
#include "DevicesLed.h"
#include "DevicesTime.h"

#include "microConfig.h"
#include "taskTimer.h"


/* 定时器句柄 */
MrTimerType *g_ptypeMrTimerPrintf = NULL;


void vMrTimerPrintf(uint32_t uiParameters)
{
    vLedRevesal(LED_CHANNEL_ALL);

    printf("time: %s cpu: %f\r\n", pcStampToTimeStrings(lTimestampGet() / 1000000), fCPUUsageGet());

    printf("PA4: %.3f, PC0: %.3f\r\n", fADCGetDMAValue(ADC_DMA_VOLTAGE_OUT), fADCGetDMAValue(ADC_DMA_CURRENT_OUT));
}
